package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 地址
 */
@Data
@TableName("address")
@ApiModel("Address对象")
public class Address implements Serializable {
    @TableId(value = "address_id",type = IdType.AUTO)
    @ApiModelProperty(value = "地址id",required = true,example = "0")
    private Integer id;//地址主键

    @TableField("address_name")
    @ApiModelProperty("地址名称")
    private String name;//地址名称

    @TableField("user_id")
    @ApiModelProperty("用户id")
    private Integer userId;//用户id

    @TableField(exist = false)
    @ApiModelProperty("用户名称")
    private String userName;
}
